from google.appengine.ext import db
class Candidate(db.Model):
    email = db.EmailProperty()                                                  # Primary Key
    details = db.ListProperty(db.Text)                                          # Name value pairs of participant details
    instructions = db.TextProperty()
    test_start_time = db.DateTimeProperty()                                     # Start time of the test
    test_end_time = db.DateTimeProperty()                                       # End time of the test        
    total_qs = db.IntegerProperty()                                             # Total questions in his exam    
    state = db.IntegerProperty()                                                # State for the student, also indicates the curr qn he is in
    has_acknowledged = db.BooleanProperty()
    group = db.ListProperty(db.Text)                                            # Indicates what questions to be displayed in a web page
    qtype = db.ListProperty(db.Text)                                            # Indicates how those questions are to be displayed
    qnos = db.ListProperty(int)                                                 # Gives the question number
    qoffsets = db.ListProperty(int)                                             # Indicates the offset of the questions
    questions = db.ListProperty(db.Text)                                        # The actual set of questions, the options/input are within it
    exp_ans = db.ListProperty(db.Text)                                          # The answers we expect to see
    prob_max_mark = db.ListProperty(int)                                        # The maximum marks given to each problem
    goffsets =  db.ListProperty(int)                                            # Indicates the offsets of the answers    
    given_ans = db.ListProperty(db.Text)                                        # The answers which we get to see, includes the source code if necessary
    prob_stud_mark = db.ListProperty(int)                                       # The mark, that student manages to score
    has_answered = db.ListProperty(bool)                                        # List indicating if he has answered or passed a question
    submit_time = db.DateTimeProperty(auto_now=True)                            # the last interaction student has with the app
    total_stud_mark = db.IntegerProperty()                                      # the total mark he scores
